@extends('layouts.app')

@section('content')
    <div class="container">
        <div class="row main">
            <div class="col-md-2">
                <div class="panel panel-default">
                    <div class="panel-heading">会员中心</div>
                    <ul class="list-group">
                        <li class="list-group-item"><a href="/venue/create">创建场馆</a> </li>
                        <li class="list-group-item"><a href="/venue/my_venues">我的场馆</a> </li>
                        <li class="list-group-item"><a href="/venue/my_follows">我的收藏</a> </li>
                        <li class="list-group-item"><a href="/user/set_icon">设置头像</a> </li>
                        <li class="list-group-item"><a href="/logout">退出登录</a> </li>
                    </ul>
                </div>

            </div>
            <div class="col-md-10">
                <div class="panel panel-default">
                    <div class="panel-heading">头像设置</div>
                    <div class="panel-body">
                        <form method="post" action="/user/save_icon" enctype="multipart/form-data">
                            @csrf
                            <div class="user-icon">
                                @if($user->icon)
                                <img src="/upload/{{$user->icon}}">
                                @else
                                    <img src="/upload/default-icon.jpg">
                                @endif

                            </div>
                            <div class="form-group">
                                <input name="icon" type="file">
                            </div>

                            <button type="submit" class="btn btn-info">Submit</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
